from meet001.meetup.models import Profile, Group
from meet001.meetup.location import code_to_location, city_code, district_code

for profile in Profile.objects.all():
  city, district = code_to_location[profile.location]
  profile.city = city_code[city]
  profile.district = district_code[district]
  profile.save()

for group in Group.objects.all():
  city, district = code_to_location[group.location]
  group.city = city_code[city]
  group.district = district_code[district]
  group.save()
  
